export const defaultMockMenu = [
    {
        code: 'device',
        name: '设备管理',
    },
    {
        code: 'deviceData',
        name: '设备数据',
    },
    {
        code: 'consult',
        name: '意见管理',
    },
    {
        code: 'news',
        name: '公告管理',
    },
    {
        code: 'member',
        name: '用户管理',
    },
]

export function getStatus(item) {
    if (item.order_status === 0 || item.order_status === 3) {
        if (item.status === 1) {
            return '待支付'
        } else if (item.status === 2) {
            if (item.address_id) {
                return '待发货'
            } else {
                return '待自提'
            }
        } else if (item.status === 3) {
            return '运输中'
        } else if (item.status === 4) {
            return '待收货'
        } else if (item.status === 5) {
            return '交易成功'
        }
    }  else if (item.order_status === 1) {
        return '退款中'
    } else if (item.order_status === 2) {
        return '退款成功'
    }
}